home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-20 | 1.2 KB | 47 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #ifndef __WINDOWLAYER_H
- #define __WINDOWLAYER_H
-
- #include "CLList.h"
- #include "CLBackgrounder.h"
- #include <QuickDraw.h>
-
- class TBaseWindow;
-
- class TWindowLayer:
- public MBackgrounder
- {
- protected:
- bool mActive;
- static TWindowLayer *sFrontLayer;
- TList<TBaseWindow*> mhWindows;
- TWindowLayer *mBelow, *mAbove;
- virtual bool CalcMouseMoveBelow( Point, RgnHandle );
- virtual TBaseWindow *FindLastWindowAbove();
- public:
- TWindowLayer();
- virtual ~TWindowLayer();
- virtual void AddWindow( TBaseWindow* );
- virtual void RemoveWindow( TBaseWindow* );
- virtual TBaseWindow *FindWindow( Point );
- virtual void CalcMouseMove( Point, RgnHandle );
- virtual TBaseWindow *FrontWindow();
- static TWindowLayer *FrontLayer();
- virtual void SelectWindow( TBaseWindow* );
- virtual void SendBehind( TBaseWindow*, TBaseWindow* );
- virtual void AddLayer( TWindowLayer* );
- bool IsActive() {return( mActive );};
- virtual void MakeActive( bool );
- virtual void HandleBackground( const TBackgroundEvent* );
- };
-
- extern TWindowLayer *gNormalWindowLayer, *gFloatingWindowLayer;
-
- inline TWindowLayer *TWindowLayer::FrontLayer()
- {
- return( sFrontLayer );
- }
-
- #endif